package com.mathmodeling.entity;

import javax.persistence.*;
import java.time.LocalDateTime;

@Entity
@Table(name = "team_member")
public class TeamMember {
    
    @Id
    @Column(name = "id", length = 36)
    private String id;
    
    @Column(name = "team_id", length = 36, nullable = false)
    private String teamId;
    
    @Column(name = "name", length = 50, nullable = false)
    private String name;
    
    @Column(name = "student_id", length = 20, nullable = false)
    private String studentId;
    
    @Column(name = "phone", length = 20)
    private String phone;
    
    @Column(name = "created_at")
    private LocalDateTime createdAt;
    
    // 构造函数
    public TeamMember() {}
    
    public TeamMember(String id, String teamId, String name, String studentId, String phone) {
        this.id = id;
        this.teamId = teamId;
        this.name = name;
        this.studentId = studentId;
        this.phone = phone;
        this.createdAt = LocalDateTime.now();
    }
    
    // Getter和Setter方法
    public String getId() {
        return id;
    }
    
    public void setId(String id) {
        this.id = id;
    }
    
    public String getTeamId() {
        return teamId;
    }
    
    public void setTeamId(String teamId) {
        this.teamId = teamId;
    }
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public String getStudentId() {
        return studentId;
    }
    
    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }
    
    public String getPhone() {
        return phone;
    }
    
    public void setPhone(String phone) {
        this.phone = phone;
    }
    
    public LocalDateTime getCreatedAt() {
        return createdAt;
    }
    
    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }
} 